package br.quest.utils;

public abstract class TaskThread extends Thread {

    @Override
    public void run() {
        try {
            executar();
            onFinish();
        } catch (Exception ex) {
            onError(ex);
        }
    }

    public abstract void executar();

    public abstract void onFinish();

    public abstract void onError(Exception ex);
}
